home *** CD-ROM | disk | FTP | other *** search
- Im having a problem with AMOSPro, and I dont know if it is the Pro editor
- itself, or something in the GUI extension that is affecting it.
-
- The problem is quite simple. My source code is being tampered with. Im
- using a procedure which executes a DOS command, and sends its output to a
- window which I define. Its not a GUI extension window, either. I'll rip the
- source code for the procedures im using, and be right back... OK Here they
- are:
-
- Procedure WCL[N]
- ' This procedure closes a window I have opened
- If WINCON(N)=0 Then Goto ERR
- Dreg(1)=WINCON(N)
- X=Doscall(-36)
- If X=0
- Goto ERR
- End If
- Pop Proc
- ERR:
- ERR=Doscall(-132)
- ' System
- End
- End Proc
-
- Procedure WEX[N,COM$]
- ' This procedure will execute a DOS command in COM$ and send the output
- ' To Window (N)
- If WINCON(N)=0 Then Goto ERR
- Dreg(1)=Varptr(COM$)
- Dreg(2)=0
- Dreg(3)=WINCON(N)
- X=Doscall(-222)
- If Len(COM$)>0
- V=Varptr(COM$)
- For ZZ=0 To Len(COM$)-1 : Poke ZZ+V,0 : Next ZZ
- End If
- If X=0
- Goto ERR
- End If
- Pop Proc
- ERR:
- ERR=Doscall(-132)
- End Proc
-
- Procedure WOP[N,X,Y,XX,YY,NAME$]
- ' This opens a CLI window XX=Width YY=Height NAME$=Title
- X$=Str$(X)-" "
- Y$=Str$(Y)-" "
- XX$=Str$(XX)-" "
- YY$=Str$(YY)-" "
- CON$="CON:"+X$+"/"+Y$+"/"+XX$+"/"+YY$+"/"+NAME$
- CON$=CON$+Chr$(0)
- Dreg(1)=Varptr(CON$)
- Dreg(2)=1005
- WINCON(N)=Doscall(-30)
- If WINCON(N)=0
- ERR=Doscall(-132)
- 'System
- End
- End If
- End Proc
-
- Procedure WPR[N,M$]
- ' This prints the text in M$ to Window (N)
- If WINCON(N)=0 Then Goto ERR
- Dreg(1)=WINCON(N)
- Dreg(2)=Varptr(M$)
- Dreg(3)=Len(M$)
- X=Doscall(-48)
- If X=0
- Goto ERR
- End If
- Pop Proc
- ERR:
- ERR=Doscall(-132)
- WCL[1]
- ' System
- End
- End Proc
-
- OK, the above procedures are the ones which involve the CLI tasking which I
- am/was using in my program. The below procedure is one of the ones which
- are seriously affected by the problem...
-
- Procedure _GETNEWS
- ' Executes the AREXX script which will grab the news for the user.
-
- If Not Exist("Mailserv:REXX/NNTPTransfer") : Rem News Recovery Program
- SEL=Gui Req("News Recovery Error...","Cannot find news recovery
- script."+Chr$(10)+"Please check you installed program correctly","OK")
- Pop Proc
- End If
-
- ' Open up a CLI window and grab the news!
- Proc WOP[2,50,50,540,100,"Mailinglist Manager Output..."]
- Proc WPR[2,"Attempting to Execute News Recovery script"+Chr$(10)+Chr$(10)]
- Proc WEX[2,"SYS:REXXC/Rx Mailserv:REXX/NNTPTransfer"]
- Wait 200
- WCL[2]
- End Proc
-
- Now, the real problem is the fact that the routine is deleting the contents
- of the WEX[""] line, no matter where i run it from, and no matter what is
- in it, when I go back to source format, the line will read:
-
- Proc WEX["
-
- Thats it, it misses a quote, and a square bracket. The wierdest thing, is
- it tests OK, and will run again, but the contents that were in it are
- annulled and doesnt pass any commands to the CLI apart from a ""
-
- Ive never used these procedures in ages, and only after starting using the
- GUI extension, am I discovering these wierd effects. Like I said, I dont
- know if its AMOSPro, or the GUI Extension.
-
- Can anyone here see what is wrong? When the program is compiled, it will
- execute the script once, then it annuls itself, and wont close the window
- as the system has locked due to the error. I really ned to send the output
- of a program to a window though. Please help me!!!!
-
- Andrew "Mushroom" Kellett
-
- P.S. Sorry for the length of this email!
-
- --
- Email: Andy Kellett <mushypd@redrose.net> Team *AMOS* + IAPA Team *AMIGA*
- alt.religion.amos - AMOS now on usenet! AMOS Mailinglist also mirrored
-
- World's Largest AMOS Homepages - http://www.mushy-pd.demon.co.uk
-
- Massive FTP site with AMOS/C64 and Mods/Samples + more at
- mushy-pd.dyn.ml.org
-
-
-